﻿//初始化
$(document).ready(function(){
	$("#vcodeimg").attr("onclick", "changevocde()");
});

//修改验证码
function changevocde(){
    $("#vcodeimg").attr("src", "/validatecode?width=68&height=27&tm=" + Math.round(Math.random() * 1000000));
}

//确定阅读
function sureread(obj){
	if(obj.checked) $("#subbutton").removeAttr("disabled");
	else $("#subbutton").attr("disabled","disabled");
}

//文本框非空验证
function checknull(name, msg){
    if ($("*[name='" + name + "']").val().length == 0){
        alert("请输入" + msg);
        $("*[name='" + name + "']").focus();
        return false;
    } else {
    	preventresubmit();
        return true;
    }
}